package com.cxso.example.request.sign;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotBlank;
import java.util.List;

@Getter
@Setter
@Schema(description = "添加模板")
public class SignAddHtmlTemplateRequest {


    @Schema(description = "模板调用名称", example = "s")
    @NotBlank(message = "模板调用名称不能为空")
    private String templateName;

    @Schema(description = "模板ID号", example = "唯一，如果调用方不填写，那么平台自动生成，字符长度最大64")
    private String templateNumber;

    @Schema(description = "模板html内容", example = "<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8”>")
    @NotBlank(message = "模板html内容不能为空")
    private String html;

    @Schema(description = "签章位置列表", example = "需要手写签名或签章时必传，位置可通过https://testapi.ecloudsign.com/sealTool/ ,获得坐标位置")
    private List<SignPositon> signPosition;

    @Getter
    @Setter
    @Schema(description = "添加模板-签章列表-入参")
    public static class SignPositon {
        @Schema(description = "签章位置", example = "s")
        @NotBlank(message = "签章位置不能为空")
        private String positionName;

        @Schema(description = "页数", example = "s")
        @NotBlank(message = "页数不能为空")
        private String page;

        @Schema(description = "X坐标", example = "s")
        @NotBlank(message = "X坐标不能为空")
        private String x;

        @Schema(description = "Y坐标", example = "s")
        @NotBlank(message = "Y坐标不能为空")
        private String y;
    }
}
